<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Design by http://www.FreeWebsiteTemplateZ.com
Released for free under a Creative Commons Attribution 3.0 License
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>cssMoban.com 网页模板,网站模板,Div+CSS模板</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="/thinkphp/Public/css/style.css" rel="stylesheet" type="text/css"/>
    <!-- CuFon: Enables smooth pretty custom font rendering. 100% SEO friendly. To disable, remove this section -->
    <script type="text/javascript" src="/thinkphp/Public/js/cufon-yui.js"></script>
    <script type="text/javascript" src="/thinkphp/Public/js/arial.js"></script>
    <script type="text/javascript" src="js/thinkphp/Public/js/cuf_run.js"></script>
    <!-- CuFon ends -->
</head>
<body>
<div class="main">
    <div class="header">
        <div class="header_resize">
            <div class="logo">
                <h1><a href="index.html">simpleweb
                    <small> only stable future</small>
                </a></h1>
            </div>
            <div class="menu_nav">
                <ul>
                    <li class="active"><a href="/thinkphp/Blog/Index/index.html">Home
                        <small>home page</small>
                    </a></li>
                    <li><a href="support.html">Support
                        <small>love news</small>
                    </a></li>
                    <li><a href="about.html">About Us
                        <small>information</small>
                    </a></li>
                    <li><a href="/thinkphp/Blog/Index/blog.html">Blog
                        <small>personal diary</small>
                    </a></li>
                    <li><a href="/thinkphp/Blog/Index/login_out">Exit
                        <small>login out</small>
                    </a></li>
                </ul>
            </div>
            <div class="clr"></div>
        </div>
    </div>

    <div class="hbg">
        <div class="hbg_resize"><img src="/thinkphp/Public/image/hbg_img.jpg" alt="image" width="888" height="239"/></div>
    </div>
<!--头部-->


    <style>
    .mainbar2{
        width: 800px;
        margin: 0 auto;
        margin-top: 50px;
        border: 1px solid #999999;
        border-radius: 10px;
        box-shadow: 4px 4px 4px #666666;
    }
    .img{
        width: 100%;
        height: 398px;
    }
    .point{
        width: 1000px;
        border: 1px dashed black;
        margin: 50px auto;
    }
    .before{
        float: left;
    }
    .later{
        float: right;
    }
    .comment{
        width: 1000px;
        margin: 0 auto;
    }
    .comment_show{
        width: 1000px;
        height: 400px;
        margin: 50px auto;
        border: solid 1px #d9d9d9;
        overflow: hidden;
        border-radius: 5px;
    }
    .co span{
        margin-left: 100px;
    }
    .co-show{
        width: 800px;
        height: 50px;
        border: dashed 1px #d9d9d9;
        margin:0 auto;
        padding: 10px;
    }
</style>

<div class="mainbar2">
    <img class="img" src="/thinkphp/Uploads/<?php echo ($blog["url"]); ?>"  alt="image" />
    <p style="font-weight: 800;text-align: center;font-size: 16px" ><?php echo ($blog["title"]); ?></p>
    <p><?php echo (htmlspecialchars_decode($blog["content"])); ?></p>
    <span>阅读<span style="color: red">（<?php echo ($blog["read_times"]); ?></span>  评论(50)</span>
</div>
<div class="point">
    <div class="before">前一篇：xxxxxxxxxxxxxxx</div>
    <div class="later">后一篇：xxxxxxxxxxxxxxxx</div>
</div>
<!--评论-->
<div class="comment">
    <h4>发表你的评论</h4>
    <form action="/thinkphp/Blog/Index/comment" method="post">
        <input type="hidden" name="article_id" value="<?php echo ($blog["id"]); ?>">
        <div>
            <!-- 加载编辑器的容器 -->
            <label for="container">评论 (required)</label>
            <script id="container" name="content" type="text/plain">
            </script>
        </div>
        <!-- 配置文件 -->
        <script type="text/javascript"
                src="/thinkphp/Public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.config.js"></script>
        <!-- 编辑器源码文件 -->
        <script type="text/javascript"
                src="/thinkphp/Public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.all.js"></script>
        <!-- 实例化编辑器 -->
        <script type="text/javascript">
            var ue = UE.getEditor('container', {
                initialFrameHeight: 200,            //设置默认的高度,
                toolbars: [
                    ['fullscreen', 'source', 'undo', 'redo'],
                    ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
                ]
            });
        </script>
        <input type="image" name="imageField" id="imageField" src="/thinkphp/Public/image/submit.gif" class="send1" style="margin-top: 20px;margin-left: 457px"/>
    </form>
</div>
<!---评论区-->
<div class="comment_show">
    <h3 style="text-align: center">评论区</h3>
    <?php if(is_array($lists)): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?><div class="co">
            <span><?php echo (date("Y-m-d:H:i:s",$row["create_at"])); ?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo ($row["username"]); ?></span>
            <div class="co-show">
                <?php echo (htmlspecialchars_decode($row["content"])); ?>
            </div>
        </div><?php endforeach; endif; else: echo "" ;endif; ?>

    <!--<?php if(is_array($lists)): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?>-->
        <!--<li><?php echo ($row["username"]); echo (htmlspecialchars_decode($row["content"])); ?></li>-->
    <!--<?php endforeach; endif; else: echo "" ;endif; ?>-->
</div>

<script type="text/javascript" src="/thinkphp/Public/js/jquery-1.11.3.js"></script>
<script>
    $("#imageField").click(function(e){
        e.preventDefault();

        var v =$(container).val();
//        alert('aa');
        $.ajax('/thinkphp/Blog/Index/comment',{
                type:'post',
                data:{
                    content:ue.getContent(),
                    article_id:<?php echo ($blog["id"]); ?>
            },
            dataType:'json',
            success:function (data) {
            console.log(data);
            if (data.status==1){
                $(".comment_show").append(data.str);
            } else {
                alert(data.msg);
            }
        }
//        return false;
    })
    });

</script>




    <!--尾部-->
    <div class="fbg" style="margin-top: 20px">
        <div class="fbg_resize">
            <div class="col c1">
                <h2><span>Image Gallery</span></h2>
                <a href="#"><img src="/thinkphp/Public/image/pix1.jpg" width="58" height="58" alt="pix"/></a>
                <a href="#"><img src="/thinkphp/Public/image/pix2.jpg" width="58" height="58" alt="pix"/></a>
                <a href="#"><img src="/thinkphp/Public/image/pix3.jpg" width="58" height="58" alt="pix"/></a>
                <a href="#"><img src="/thinkphp/Public/image/pix4.jpg" width="58" height="58" alt="pix"/></a>
                <a href="#"><img src="/thinkphp/Public/image/pix5.jpg" width="58" height="58" alt="pix"/></a>
                <a href="#"><img src="/thinkphp/Public/image/pix6.jpg" width="58" height="58" alt="pix"/></a>
            </div>
            <div class="col c2">
                <h2><span>Lorem Ipsum</span></h2>
                <p>Lorem ipsum dolor<br/>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec libero.
                    Suspendisse bibendum. Cras id urna. <a href="#">Morbi tincidunt, orci ac convallis aliquam</a>,
                    lectus turpis varius lorem, eu posuere nunc justo tempus leo. Donec mattis, purus nec placerat
                    bibendum, dui pede condimentum odio, ac blandit ante orci ut diam.</p>
            </div>
            <div class="col c3">
                <h2><span>About</span></h2>
                <img src="/thinkphp/Public/image/white.jpg" width="56" height="56" alt="pix"/>
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec libero. Suspendisse bibendum. Cras id
                    urna. Morbi tincidunt, orci ac convallis aliquam, lectus turpis varius lorem, eu posuere nunc justo
                    tempus leo. llorem, eu posuere nunc justo tempus leo. Donec mattis, purus nec placerat bibendum. <a
                            href="#">Learn more...</a></p>
            </div>
            <div class="clr"></div>
        </div>
    </div>
    <div class="footer">
        <div class="footer_resize">
            <p class="lf">© Copyright <a href="#">MyWebSite</a>. Layout from [Z] <a href="http://www.cssmoban.com/"
                                                                                    title="网页模板">cssMoban.com</a></p>
            <ul class="fmenu">
                <li class="active"><a href="/thinkphp/Blog/Index/index.html">Home</a></li>
                <li><a href="support.html">Support</a></li>
                <li><a href="/thinkphp/Blog/Index/blog.html">Blog</a></li>
                <li><a href="about.html">About Us</a></li>
                <li><a href="/thinkphp/Blog/Index/login.html">Exit</a></li>
            </ul>
            <div class="clr"></div>
        </div>
    </div>
</div>
</body>
</html>